<template>
  <div class="app-container">
    <!--工具栏-->
    <div class="head-container">
      <!-- 搜索 -->
      <el-input v-model="query.blurry" clearable size="small" placeholder="模糊搜索" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
      <rrOperation :crud="crud" />
      <!--表格渲染-->
      <el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
        <el-table-column type="selection" width="55" />
        <el-table-column prop="nickName" label="微信用户名称" />
        <el-table-column label="申请数量">
          <template slot-scope="scope">
            <el-button size="mini" style="margin-right: 2px" type="text">
              <router-link :to="{path: '/monitor/sqrjk/sqrjkmx/', query: { userId: scope.row.id }}">
                {{ scope.row.cnt }}
              </router-link>
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <!--分页组件-->
      <pagination />
    </div>
  </div>
</template>

<script>
import crudYmk from '@/api/business/ymk'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'

const defaultForm = { bisYmkId: null, bisYmkYbdzm: null, bisYmkYbmc: null, bisYmkYbzjm: null, bisYmkYbdj: null, bisYmkYbfwsc: null, bisYmkYbfwlb: null, ywlx: null, lrr: null, lrrxm: null, lrbm: null, lrbmmc: null, lrsj: null, gxr: null, gxrxm: null, gxbm: null, gxbmmc: null, gxsj: null, sfyx: null, bz: null }
export default {
  name: 'Ymk',
  components: { pagination, crudOperation, rrOperation, udOperation },
  mixins: [presenter(), header(), form(defaultForm), crud()],
  dicts: ['sfxmdj'],
  cruds() {
    return CRUD({ title: '异名库', url: 'api/sqrjk/querySqrjk', idField: '', sort: '', crudMethod: { ...crudYmk }})
  },
  data() {
    return {}
  },
  methods: {
    // 钩子：在获取表格数据之前执行，false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      return true
    }
  }
}
</script>

<style scoped>

</style>
